package com.qf.ym.web;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.ym.service.MemberService;
import com.qf.ym.entity.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class MemberController {

    @Autowired
    MemberService memberService;


    //会员用户列表
    @RequestMapping("userlist")
    public String userList(HttpServletRequest request){

        PageHelper.startPage(1,5);

        List<UserEntity> memberlist = memberService.queryUserList(null);

        PageInfo<UserEntity> pageInfo = new PageInfo<>(memberlist);

        request.setAttribute("pageInfo",pageInfo);


        return "memberlist";
    }


    //通过id删除会员
    @RequestMapping("delmember")
    public String delmember(int aid,HttpServletRequest request){



        return "";

    }



}
